<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>教师列表</title>
</head>
<body>
    <h1>教师列表</h1>
    <table border="1">
        <tr>
            <th>姓名</th>
            <th>专业</th>
            <th>操作</th>
        </tr>
        <tr th:each="teacher : ${teachers}">
            <td th:text="${teacher.name}"></td>
            <td th:text="${teacher.major}"></td>
            <td>
                <a th:href="@{/students/assign/{id}(id=${teacher.id})}">分配学生</a>
            </td>
        </tr>
    </table>
    <br>
    <a th:href="@{/teachers/new}">新增教师</a>
    <br>
    <a th:href="@{/students/new}">新增学生</a>
</body>
</html> 